#ifndef __MW_CPP_SPARK_EFFECT_H__
#define __MW_CPP_SPARK_EFFECT_H__

#include "cocos2d.h"
#include "GameLayer.h"
USING_NS_CC;

class SparkEffect : public cocos2d::Sprite
{
    
private:
    Sprite * m_spark1=nullptr;
    Sprite* m_spark2 = nullptr;
    bool m_active = false;
    float m_duration = 0.7f;
    float m_scale = 1.2f;
public:
    CREATE_FUNC(SparkEffect);
    SparkEffect();
    ~SparkEffect(void);
    
    virtual bool init();
    void reset(Point pos);
    void destroy();
   
    static SparkEffect* getOrCreateSparkEffect(Point pos);
    
    static void preSet();
    static void sharedExplosion();

    
};
#endif /* defined(__MW_CPP_SPARK_EFFECT_H__) */